/**
 **@author:		周羽
 **@date:		2017-03-30
 **@brief:		打开消息队列，接收来自
 **/
#include "pthread_client_request.h"

void pthread_client_request(void)
{
	get_queue_id();

	if(msgrcv(msgid, (void *)&msg, sizeof(struct msg_t)-sizeof(long), 10, 0) < 0)
	{
		perror("fail to msgrcv");
		exit(-1);
	}

	switch(msg.text)
	{
	case 0x40://关闭风扇
		break;
	case 0x41://风扇1档
		break;
	case 0x42://风扇2档
		break;
	case 0x43://风扇3档
		break;

	case 0x50://蜂鸣器关闭
		break;
	case 0x51://蜂鸣器打开
		break;
	case 0x52://自动报警关闭
		break;
	case 0x53://自动报警打开
		break;

	case 0x60://LED关闭
		break;
	case 0x51://LED打开
		break;
	
	case 0x70://数码管显示0
		break;
	case 0x71://1
		break;
	case 0x72://2
		break;
	case 0x73://3
		break;
	case 0x74://4
		break;
	case 0x75://5数码管显示5
		break;
	case 0x76://6
		break;
	case 0x77://7
		break;
	case 0x78://8
		break;
	case 0x79://9数码管显示9
		break;
	case 0x7f://关闭数码管
		break;
	}
}

